package com.test.demo.service.impl;

import com.test.demo.entity.User;
import com.test.demo.mapper.UserMapper;
import com.test.demo.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author 涛
 * @since 2023-01-13
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    private UserMapper userMapper;
//    模糊查询
    public List<User> findUserByName(String userName) {
        return userMapper.findUserByName(userName);
    }

    //    批量删除
    public int dels(List<Integer> ids) {
        return userMapper.dels(ids);
    }
    //    查询带分页
    public List<User> queryPage(Integer startRows, int size) {
        return userMapper.queryPage(startRows, size);
    }
}
